package com.atguigu.gulimall.member.service;

import com.atguigu.common.vo.UserLoginVo;
import com.atguigu.gulimall.member.exception.PhoneException;
import com.atguigu.gulimall.member.vo.MemberRegisterVo;
import com.atguigu.gulimall.member.vo.SocialUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.member.entity.MemberEntity;
import org.omg.CORBA.UserException;

import java.util.Map;

/**
 * 会员
 *
 * @author Dafei
 * @email 1090902935@qq.com
 * @date 2021-10-31 21:57:58
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegisterVo vo);

    void checkPhoneUnique(String phone) throws PhoneException;

    void checkUsernameUnique(String userName) throws UserException;

    MemberEntity login(UserLoginVo vo);

    /**
     * 社交用户的登录
     * @param socialUser
     * @return
     */
    MemberEntity login(SocialUser socialUser) throws Exception;

    /**
     * 微信登录
     * @param accessTokenInfo
     * @return
     */
    MemberEntity login(String accessTokenInfo);
}

